import React from 'react';
import { connect } from 'dva';
import MainCard from './MainCard';


class TodayWork extends React.Component {

  componentDidMount() {
    const { dispatch } = this.props;
    dispatch({
      type: 'produceDashboard/fetchTodayWork',
    });
  }

  render() {
    const { todayWork } = this.props.produceDashboard;
    return (
      <MainCard {...todayWork} />
    );
  }
}

export default connect(
  ({ produceDashboard }) => ({
    produceDashboard,
  })
)(TodayWork);
